package com.authorization.project.authorization.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.authorization.framework.aspectj.lang.annotation.Excel;
import com.authorization.framework.web.domain.BaseEntity;
import java.util.Date;

/**
 * 授权日志对象 authorization_log
 * 
 * @author 李晓雷
 * @date 2020-05-11
 */
public class AuthorizationLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 客户全称 */
    @Excel(name = "客户全称")
    private String username;

    /** 授权开始日期 */
    @Excel(name = "授权开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date begidate;

    /** 停止日期 */
    @Excel(name = "停止日期", width = 30, dateFormat = "yyyy-MM-dd")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date enddate;

    /** ip */
    @Excel(name = "ip")
    private String ip;

    /** 服务名称 */
    @Excel(name = "服务名称")
    private String serverName;

    /** 授权状态 */
    @Excel(name = "授权状态")
    private String authStatus;

    /** 产品主键 */
    @Excel(name = "产品主键")
    private Long productId;

    /** 客户编号 */
    @Excel(name = "客户编号")
    private String userid;

    /** 机器码（ip+mac地址） */
    @Excel(name = "机器码", readConverterExp = "机器码")
    private String machineCode;

    /**失败原因**/
    @Excel(name = "失败原因", readConverterExp = "失败原因")
    private String failMsg;

    /**产品名称**/
    private String productName;

    public String getFailMsg() {
        return failMsg;
    }

    public void setFailMsg(String failMsg) {
        this.failMsg = failMsg;
    }

    public String getMachineCode() {
        return machineCode;
    }

    public void setMachineCode(String machineCode) {
        this.machineCode = machineCode;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }
    public void setBegidate(Date begidate) 
    {
        this.begidate = begidate;
    }

    public Date getBegidate() 
    {
        return begidate;
    }
    public void setEnddate(Date enddate) 
    {
        this.enddate = enddate;
    }

    public Date getEnddate() 
    {
        return enddate;
    }
    public void setIp(String ip) 
    {
        this.ip = ip;
    }

    public String getIp() 
    {
        return ip;
    }
    public void setServerName(String serverName) 
    {
        this.serverName = serverName;
    }

    public String getServerName() 
    {
        return serverName;
    }
    public void setAuthStatus(String authStatus) 
    {
        this.authStatus = authStatus;
    }

    public String getAuthStatus() 
    {
        return authStatus;
    }
    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }
    public void setUserid(String userid) 
    {
        this.userid = userid;
    }

    public String getUserid() 
    {
        return userid;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("username", getUsername())
            .append("begidate", getBegidate())
            .append("enddate", getEnddate())
            .append("ip", getIp())
            .append("serverName", getServerName())
            .append("authStatus", getAuthStatus())
            .append("productId", getProductId())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("userid", getUserid())
            .toString();
    }
}
